package Modelo.Edicao;

import java.util.Calendar;

public class Edicao {
	
	private long codEvento;
	private int nroEdicao;
	private String localEdicao;
	private Calendar dataIniEdicao;
	private Calendar dataFimEdicao;
	private int nroInscritosEdicao;
	
	public Edicao()
	{
		
	}
	
	public Edicao(long codEvento, int nroEdicao, String localEdicao,
			Calendar dataIniEdicao, Calendar dataFimEdicao,
			int nroInscritosEdicao) {
		super();
		this.codEvento = codEvento;
		this.nroEdicao = nroEdicao;
		this.localEdicao = localEdicao;
		this.dataIniEdicao = dataIniEdicao;
		this.dataFimEdicao = dataFimEdicao;
		this.nroInscritosEdicao = nroInscritosEdicao;
	}



	public Edicao(long codEvento, String localEdicao,
			Calendar dataIniEdicao, Calendar dataFimEdicao,
			int nroInscritosEdicao) {
		super();
		this.codEvento = codEvento;
		this.localEdicao = localEdicao;
		this.dataIniEdicao = dataIniEdicao;
		this.dataFimEdicao = dataFimEdicao;
		this.nroInscritosEdicao = nroInscritosEdicao;
	}
	public long getCodEvento() {
		return codEvento;
	}
	public void setCodEvento(long codEvento) {
		this.codEvento = codEvento;
	}
	public int getNroEdicao() {
		return nroEdicao;
	}
	public String getLocalEdicao() {
		return localEdicao;
	}
	public void setLocalEdicao(String localEdicao) {
		this.localEdicao = localEdicao;
	}
	public Calendar getDataIniEdicao() {
		return dataIniEdicao;
	}
	public void setDataIniEdicao(Calendar dataIniEdicao) {
		this.dataIniEdicao = dataIniEdicao;
	}
	public Calendar getDataFimEdicao() {
		return dataFimEdicao;
	}
	public void setDataFimEdicao(Calendar dataFimEdicao) {
		this.dataFimEdicao = dataFimEdicao;
	}
	public int getNroInscritosEdicao() {
		return nroInscritosEdicao;
	}
	public void setNroInscritosEdicao(int nroInscritosEdicao) {
		this.nroInscritosEdicao = nroInscritosEdicao;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (codEvento ^ (codEvento >>> 32));
		result = prime * result
				+ ((dataFimEdicao == null) ? 0 : dataFimEdicao.hashCode());
		result = prime * result
				+ ((dataIniEdicao == null) ? 0 : dataIniEdicao.hashCode());
		result = prime * result
				+ ((localEdicao == null) ? 0 : localEdicao.hashCode());
		result = prime * result + nroEdicao;
		result = prime * result + nroInscritosEdicao;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Edicao other = (Edicao) obj;
		if (codEvento != other.codEvento)
			return false;
		if (dataFimEdicao == null) {
			if (other.dataFimEdicao != null)
				return false;
		} else if (!dataFimEdicao.equals(other.dataFimEdicao))
			return false;
		if (dataIniEdicao == null) {
			if (other.dataIniEdicao != null)
				return false;
		} else if (!dataIniEdicao.equals(other.dataIniEdicao))
			return false;
		if (localEdicao == null) {
			if (other.localEdicao != null)
				return false;
		} else if (!localEdicao.equals(other.localEdicao))
			return false;
		if (nroEdicao != other.nroEdicao)
			return false;
		if (nroInscritosEdicao != other.nroInscritosEdicao)
			return false;
		return true;
	}
	
	

}
